{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "乐学偶得版权所有  公众号：乐学Fintech  主讲人：William LX_LAB教研团队提供技术支持 正版视频： 网易云课堂：乐学偶得"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "20.写一个函数，这个函数能够pass进去四个参数，这个函数能够将四个参数进行求和汇总操作，但是，如果其中两个值是一样的话，汇总结果变为888\n",
    "tips: 自定义参数sum，or"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 以下当你定义func的时候，里面的参数叫做parameter\n",
    "def BB_SUM(a,b,c,d):\n",
    "    if a == b or a == c or a == d or b == c or b == d or c ==d :\n",
    "        BB_SUM = 888\n",
    "    else:\n",
    "        BB_SUM =a+b+c+d\n",
    "    return BB_SUM\n",
    "\n",
    "\n",
    "# 当你真实调用函数的时候，里面的参数叫做argument\n",
    "print(BB_SUM(1,2,3,4))\n",
    "print(BB_SUM(1,2,3,1))"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
